package system

import (
	"goweb/web/api"

	"github.com/gofiber/fiber/v2"
)

// 定义 User 路由(Java controller)
type UserRouter struct {
}

// 初始化 Role 路由
func (u *UserRouter) InitUserRouter(router fiber.Router) {
	userRouter := router.Group("user")

	// 获取User Api
	var userApi = api.AppApi.SystemApi.User
	{
		userRouter.Post("create", userApi.Create)
		userRouter.Put("update", userApi.Update)
		userRouter.Get("list", userApi.List)
		userRouter.Put("page", userApi.Page)
		userRouter.Get("info/:uuid", userApi.GetInfo)
		userRouter.Delete("delete/:uuid", userApi.Delete)
		userRouter.Put("batch/delete", userApi.BatchDelete)
	}
}
